﻿using Microsoft.VisualBasic.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hyjx.Config.Object
{
    public class SettingJson
    {
        /// <summary>
        /// 
        /// </summary>
        public string? WebApiBaseUrl { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int CheckMesOnlineSeconds { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ReportMixerStatusSeconds { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ReportMixerAlarmSeconds { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int StepStatusChangedSeconds { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public LogDB? LogDB { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<MaterialCodesItem>? MaterialCodes { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public RecipePoint? RecipePoint { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<MixersItem>? Mixers { get; set; }
    }

    public class LogDB
    {
        /// <summary>
        /// 
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? Password { get; set; }
    }

    public class MaterialCodesItem
    {
        /// <summary>
        /// SP 粉
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int FeatureType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int GanFengValue { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int HongYunValue { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? ToleranceUpperLimitAddress { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? ToleranceLowerLimitAddress { get; set; }
    }

    public class RecipePoint
    {
        /// <summary>
        /// 
        /// </summary>
        public string? WriteMesModeAddress { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int RealtimeDataBlock { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int RealtimeStartIndex { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int RealtimeDataLength { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int RealtimeStepStatus { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int RealtimeStepNumber { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? RealtimeMesMode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ReadEndSymbleStart { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int ReadDataBlock { get; set; }
    }

    public class PlcsItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string? ControlDevice { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? Ip { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int Rack { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int Slot { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool IsEnabled { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int CpuType { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? MesMode { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string? StepSignal { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int FeatureType { get; set; }
    }

    public class MixersItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string? Line { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool IsEnabled { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public List<PlcsItem>? Plcs { get; set; }
    }
}
